# man completion
import re

exp=re.compile('[^\s(,]+')

options=[exp.search(a).group(0) for a in `apropos .`.splitlines()]
   
def complete_man(words,extra):
    list=[a+' ' for a in options if a.startswith(words[-1])]
      
    return ('Man pages',list),

addcompleter('man',complete_man)

